// AudioDataset.h
#ifndef AUDIO_DATASET_H
#define AUDIO_DATASET_H

#include <string>
#include <unicode/unistr.h>

class AudioDataset {
public:
    static constexpr int countThreshold = 20;

public:
    AudioDataset();
    void append(const std::string& input);
    std::string nextSentence(bool &done);
    void reset();
    bool postDone(void) {
        return post_done_;
    }
    void setPostDone(bool done) {
        post_done_ = done;
    }
    int size() {
        return buffer_.countChar32();
    }
    int remainSize() {  // 还剩下多少字符没有被转换
        return (buffer_.countChar32() - position_);
    }

private:
    icu::UnicodeString buffer_;
    int position_ = 0;
    bool post_done_ = false;
};

#endif // AUDIO_DATASET_H
